#include"comm.hpp"

int main()
{
    // 创建共享内存
    int shmid = CreateShm();
    // 挂接
    char* shmaddr = (char*)shmat(shmid, nullptr, 0);

    // 直接通信
    while(true)
    {
        cout<<"clinet say@ "<<shmaddr<<endl;
        sleep(1);
    }
    // 去关联
    shmdt(shmaddr);

    return 0;
}